<div class="container">
    <form class="form-signin" action="/accounts/login/" method="post">
        {% csrf_token %}
        <!--csrf_token：生成令牌-->
        <h2 class="form-signin-heading">登录系统</h2>
        <label for="inputUsername" class="sr-only">账号</label>
        <input type="text" name="username" id="inputUsername" class="form-control" placeholder="username" required
            autofocus>
        <label for="inputPassword" class="sr-only">密码</label>
        <input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>
        <div class="checkbox">
            <label>
                <input type="checkbox" value="remember-me"> 记住密码
            </label>
        </div>
        <br />
        <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
        <br />
        <span style="color: red;">{{ login_err }}</span>
    </form>
</div>

<!-- /container -->